#ifndef SVG_OPT_H
#define SVG_OPT_H

#include "xml_opt.h"

#ifdef __cplusplus
extern "C"
{
#endif

    typedef struct
    {
        int rx; 
        int ry; 
    } svg_rxy_type;

    typedef struct
    {
        int x; 
        int y; 
    } svg_point_type;

#define svg_start() xml_puts("<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">")
#define svg_end() xml_puts("</svg>")

#define svg_open() xml_puts("<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"")
#define svg_close() xml_puts(">");

#define svg_lable_open xml_lable_open
#define svg_lable_close() xml_puts("/>")

    void svg_stroke(xml_opt_type *opt, const char *fill, const char *stroke, int stroke_width, uint8_t i_pn);

    void svg_rect_open(xml_opt_type *opt, int x, int y, int width, int height, uint8_t i_pn);

    void svg_rect_rxy(xml_opt_type *opt, svg_rxy_type rxy, uint8_t i_pn);

    void svg_cycle_open(xml_opt_type *opt, int cx, int cy, int r, uint8_t i_pn);

    void svg_ellipse_open(xml_opt_type *opt, int cx, int cy, int rx, int ry, uint8_t i_pn);

    void svg_line_open(xml_opt_type *opt, int x1, int y1, int x2, int y2, uint8_t i_pn);

    void svg_polygon_open(xml_opt_type *opt, const svg_point_type *points, size_t point_count, uint8_t i_pn);

    void svg_polyline_open(xml_opt_type *opt, const svg_point_type *points, size_t point_count, uint8_t i_pn);

    void svg_text_open(xml_opt_type *opt, int x, int y, const char *text, uint8_t i_pn);

    void svg_text_font(xml_opt_type *opt, const char *font_family, const char *font_color, int font_size, uint8_t i_pn);

#ifdef __cplusplus
} 
#endif 

#endif 
